<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>
            tornado 管理后台
        </title>
        <link rel="stylesheet" type="text/css" href="/static/style/admin/admin.css"
        />
        <script type="text/javascript" src="/static/style/js/jquery-1.2.6.min.js">
        </script>
        <script type="text/javascript">
            function adjuctContents() {
                h = document.documentElement.offsetHeight;
                w = document.documentElement.offsetWidth;
                $("#contents").width(w - 159).height(h - 90);
                if ($.browser.version == '6.0') {
                    $("#mask").width(w - 166).height(h - 104);
                } else {
                    $("#mask").width(w - 160).height(h - 100);
                }
            }
            $(document).ready(function() {
                if ($.browser.msie) {
                    adjuctContents();
                    $(window).resize(adjuctContents);
                }
            });
            function fnOnTabClick(tab, title) {
                $("#header_tabs > ul > li").removeClass("current");
                $(tab).parent().parent().addClass("current");
                $("#menus > ul").css("display", "none");
                id = "#menu_" + title;
                $(id).css("display", "");
                fnOnMenuClick($(id + " > li > a:first").get(0));
            }
            function fnOnMenuClick(menu) {
                $("#menus > ul > li").removeClass("current");
                $(menu).parent().addClass("current");
                if (menu.target != '_blank') {
                    m = $("#mask").get(0);
                    m.src = menu.href;
                    m.focus();
                } else {
                    window.open(menu.href);
                }
            }
        </script>
    </head>

    <body>
        <!-- header -->
        <div id="header">
            <div id="logo">
                566che.com 社区管理后台
            </div>
            <div id="panel">
                <div id="header_tabs">
                    <ul>
                        {% set current_tab = false %} {% for menus in config.admin_menus %}
                        <li class="{% if loop.index==1 %}current {% endif %} {% if menus[1] %}more{% endif %}">
                            <span>
                                <a href="#" onclick="fnOnTabClick(this, '{{menus[0]}}'); return false;">
                                    {{menus[0]}}
                                </a>
                            </span>
                        </li>
                        {% endfor %}
                    </ul>
                    <div id="header_links">
                        <p>
                            您好,
                            <strong>
                                {{current_user.username}}
                            </strong>
                            &nbsp;&nbsp;[&nbsp;
                            <a href="/admin/logout">
                                退出
                            </a>
                            &nbsp;]
                        </p>
                        <p>
                            <a href="/" class="btnlink" target="_blank">
                                网站首页
                            </a>
                        </p>
                    </div>
                </div>
                <div id="breadcrumbs">
                </div>
            </div>
        </div>
        <!-- /header -->
        <!-- main -->
        <div id="main">
            <div id="sidebar">
                <div id="menus">
                    {% set current_menu = false %} {% for menus in config.admin_menus %}
                    <ul id="menu_{{menus[0]}}" {% if loop.index!=1 %}style="display: none;"
                    {% endif %}>
                        {% for menu in menus[1] %}
                        <li{% if loop.index==1 %} class="current" {% endif %}>
                            <a href="{{ menu[1] }}" onclick="fnOnMenuClick(this); return false;">
                                {{ menu[0] }}
                            </a>
                            </li>
                            {% endfor %}
                    </ul>
                    {% endfor %}
                </div>
            </div>
            <div id="contents">
                <iframe id="mask" src="/admin/default/main" frameborder="0" name="main">
                </iframe>
            </div>
        </div>
        <div id="copyright">
            <p>
                Powered by
                <a href="http://www.tuzibang.net/" target="_blank">
                    tuzibang
                </a>
            </p>
            <p>
                &copy; 2011,
                <a href="http://www.tuzibang.net/" target="_blank">
                    tuzibang Inc.
                </a>
            </p>
        </div>
        <!-- /main -->
    </body>

</html>